import ajax from '@/http/ajax.js'

const api = {
    upload: '/admin/upload', // 上传图片
    getImage: '/admin/getImage', // 获取图片
    deleteImage: '/admin/deleteImage', // 删除图片
    configImg: '/admin/configImg', // 配置图片
    getByImgList: '/admin/getByImgList', // 获取可购买图片列表
    buyImg: '/admin/buyImg', // 购买图片
    getUserInfo: '/admin/getUserInfo', // 获取用户信息  
    recharge: '/admin/recharge', // 充值  
    deleteUserInfo: '/admin/deleteUserInfo' // 删除用户信息    
    
}

export const upload = data => ajax({
    url: api.upload,
    method: 'POST',
    data: data
})

export const getImage = data => ajax({
    url: api.getImage,
    method: 'POST',
    data: data
})


export const deleteImage = data => ajax({
    url: api.deleteImage,
    method: 'POST',
    data: data
})

export const configImg = data => ajax({
    url: api.configImg,
    method: 'POST',
    data: data
})  

export const getByImgList = data => ajax({
    url: api.getByImgList,
    method: 'POST',
    data: data
})

export const buyImg = data => ajax({
    url: api.buyImg,
    method: 'POST',
    data: data
})

export const getUserInfo = data => ajax({
    url: api.getUserInfo,
    method: 'POST',
    data: data
})

export const deleteUserInfo = data => ajax({
    url: api.deleteUserInfo,
    method: 'POST',
    data: data
})

export const recharge = data => ajax({
    url: api.recharge,
    method: 'POST',
    data: data
})